﻿using loginWinForm.common;
using loginWinForm.content;
using System;
using System.Windows.Forms;

namespace loginWinForm.form
{
    public partial class Success : Form
    {
        public Success()
        {
            if (null == CONTENT.SysUser)
            {
                ResultBox.fail("请登录后访问","登录提示");
                this.Hide();
                new login().Show();
            }
            else
            {
                InitializeComponent();
                this.successText.Text = "欢迎您 - " + CONTENT.SysUser.Mc;
            }
            
        }

        private void logout_Click(object sender, EventArgs e)
        {
            this.Hide();
            CONTENT.SysUser = null;
            new login().Show();
        }

    }
}
